﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/adminmain.master" AutoEventWireup="true" CodeFile="managerFeedBack.aspx.cs" Inherits="admin_managerFeedBack" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
 function fun_confirm() {
        return confirm("你确定要删除吗?");

    }
    function CheckAll(checkbox) {
        var CheckBoxes = document.getElementsByTagName("input");
        for (var i = 0; i < CheckBoxes.length; i++) {
            if (CheckBoxes[i].type == "checkbox") {
                CheckBoxes[i].checked = checkbox.checked;
            }
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataSourceID="ObFeedBack" 
        ForeColor="#333333" GridLines="None" PageSize="5" Width="98%">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
           <asp:TemplateField>
                <ItemTemplate>
                    <asp:CheckBox ID="cbCheck" runat="server" />
                </ItemTemplate>
                <HeaderTemplate>
                    <asp:CheckBox ID="cbAll" Text="全选" onclick="CheckAll(this)" runat="server" />
                </HeaderTemplate>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="FId" SortExpression="FId" Visible="False">
                <EditItemTemplate>
                    <asp:TextBox ID="lblfid" runat="server" Text='<%# Bind("FId") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblfid" runat="server" Text='<%# Bind("FId") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="用户名" SortExpression="UserId">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("User.UName") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("User.UName") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="反馈信息" SortExpression="Message">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Message") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Message") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
            <asp:BoundField DataField="FAddTime" HeaderText="反馈时间" 
                SortExpression="FAddTime">
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="IsDel" SortExpression="IsDel" Visible="False">
                <EditItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("IsDel") %>' />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("IsDel") %>' 
                        Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="FId" 
                DataNavigateUrlFormatString="managerFBdetail.aspx?id={0}" Text="详细" />
            <asp:TemplateField>
            <ItemTemplate>
                <a href='deleteFB.ashx?id=<%#Eval("FId") %>' onclick="return fun_confirm()">删除</a>
            </ItemTemplate>
        </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <br />
    <asp:LinkButton ID="LinkButton1" ForeColor="Red" runat="server" 
        onclick="LinkButton1_Click" OnClientClick="return fun_confirm()">删除选中</asp:LinkButton>
    <asp:ObjectDataSource ID="ObFeedBack" runat="server" SelectMethod="getAllFB" 
        TypeName="BLL.FeedBack">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="pagenum" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

